Enable hardening flags
authorKan-Ru Chen <koster@debian.org>
Sat, 17 Dec 2011 10:41:52 +0000 (18:41 +0800)
committerKan-Ru Chen <koster@debian.org>
Sat, 17 Dec 2011 10:57:03 +0000 (18:57 +0800)
debian/changelog
debian/control
debian/rules

index b7c8e992213ed2925c63c6c8f9a891bb3440748d..bc88a0b14e2e353b05b48e3ee001c494240f94cf 100644 (file)
@@ -3,6 +3,7 @@ opencc (0.3.0-1) unstable; urgency=low
   * New upstream release
   * Remove autotools-dev and quilt from Build-Depends
   * Support `nostrip' DEB_BUILD_OPTIONS
+  * Enable hardening flags.
   * debian/patches/fix-big-endian-build.diff: merged upstream
   * debian/patches/fix-new-test-cases.patch: New patch.
 
index a6d5394b67b3a780f0b411e20c5c9984aa724f1d..57e3303717c8dacb4516a12c6f9b3a5d41a8ed52 100644 (file)
@@ -2,7 +2,7 @@ Source: opencc
 Priority: optional
 Maintainer: IME Packaging Team <pkg-ime-devel@lists.alioth.debian.org> 
 Uploaders: LI Daobing <lidaobing@debian.org>, Asias He <asias.hejun@gmail.com>
-Build-Depends: debhelper (>= 7.0.50~), cmake
+Build-Depends: debhelper (>= 7.0.50~), dpkg-dev (>= 1.16.1.1~), cmake
 Standards-Version: 3.9.2
 Section: libs
 Homepage: http://code.google.com/p/opencc
index c81f1fa628016594ae6c8862cab161a739f76578..75ecb9ad332f56a1c16247320766d4db6e282b64 100755 (executable)
@@ -1,13 +1,10 @@
 #!/usr/bin/make -f
-
-ifeq (,$(filter nostrip,$(DEB_BUILD_OPTIONS)))
-  BUILD_TYPE=Release
-else
-  BUILD_TYPE=Debug
-endif
+export DEB_BUILD_MAINT_OPTIONS = hardening=+all
+DPKG_EXPORT_BUILDFLAGS = 1
+include /usr/share/dpkg/buildflags.mk
 
 %:
        dh  $@
 
 override_dh_auto_configure:
-       dh_auto_configure -- -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=$(BUILD_TYPE) -DENABLE_GETTEXT:BOOL=ON
+       dh_auto_configure -- -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=Release -DENABLE_GETTEXT:BOOL=ON